<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "https://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="Content-Language" content="zh-CN"><link href="stylesheet.css" media="all" rel="stylesheet" type="text/css">
<title>性能提升技巧</title>
<script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?d286c55b63a3c54a1e43d10d4c203e75"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script>
</head><body class="CHAPTER">
<div>
<table summary="Header navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><th colspan="5" align="center" valign="bottom">PostgreSQL 8.2.3 中文文档</th></tr>
<tr><td width="10%" align="left" valign="top"><a href="locking-indexes.html" accesskey="P">后退</a></td><td width="10%" align="left" valign="top"><a href="mvcc.html">快退</a></td><td width="60%" align="center" valign="bottom"></td><td width="10%" align="right" valign="top"><a href="admin.html">快进</a></td><td width="10%" align="right" valign="top"><a href="using-explain.html" accesskey="N">前进</a></td></tr>
</table>
<hr align="LEFT" width="100%"></div>
<div class="CHAPTER"><h1><a name="PERFORMANCE-TIPS"></a>章13. 性能提升技巧</h1>
<div>
<dl>
<dt><b>目录</b></dt>
<dt>13.1. <a href="using-explain.html">使用 <tt class="COMMAND">EXPLAIN</tt></a></dt>
<dt>13.2. <a href="planner-stats.html">规划器使用的统计信息</a></dt>
<dt>13.3. <a href="explicit-joins.html">用明确的 <tt class="LITERAL">JOIN</tt> 控制规划器</a></dt>
<dt>13.4. <a href="populate.html">向数据库中添加记录</a></dt>
<dd><dl>
<dt>13.4.1. <a href="populate.html#DISABLE-AUTOCOMMIT">关闭自动提交</a></dt>
<dt>13.4.2. <a href="populate.html#POPULATE-COPY-FROM">使用 <tt class="COMMAND">COPY</tt></a></dt>
<dt>13.4.3. <a href="populate.html#POPULATE-RM-INDEXES">删除索引</a></dt>
<dt>13.4.4. <a href="populate.html#POPULATE-RM-FKEYS">删除外键约束</a></dt>
<dt>13.4.5. <a href="populate.html#POPULATE-WORK-MEM">增大 <tt class="VARNAME">maintenance_work_mem</tt></a></dt>
<dt>13.4.6. <a href="populate.html#POPULATE-CHECKPOINT-SEGMENTS">增大 <tt class="VARNAME">checkpoint_segments</tt></a></dt>
<dt>13.4.7. <a href="populate.html#POPULATE-ANALYZE">事后运行 <tt class="COMMAND">ANALYZE</tt> Afterwards</a></dt>
<dt>13.4.8. <a href="populate.html#POPULATE-PG-DUMP"><span class="APPLICATION">pg_dump</span></a> 的一些注意事项</dt>
</dl></dd>
</dl>
</div>
<a name="AEN16737"></a>
<p>查询的性能可能受多种因素影响。其中一些因素可以由用户操纵，而其它的则属于下层系统设计的基本问题了。本章我们提供一些有关理解和调节 PostgreSQL 性能的线索。</p>
</div>
<div>
<hr align="LEFT" width="100%">
<table summary="Footer navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td width="33%" align="left" valign="top"><a href="locking-indexes.html" accesskey="P">后退</a></td><td width="34%" align="center" valign="top"><a href="index.html" accesskey="H">首页</a></td><td width="33%" align="right" valign="top"><a href="using-explain.html" accesskey="N">前进</a></td></tr>
<tr><td width="33%" align="left" valign="top">锁和索引</td><td width="34%" align="center" valign="top"><a href="sql.html" accesskey="U">上一级</a></td><td width="33%" align="right" valign="top">使用 <tt class="COMMAND">EXPLAIN</tt></td></tr>
</table>
</div>
</body></html>